package com.film.service.impl;

import java.util.List;

import com.film.dao.ReviewPriaseDao;
import com.film.dao.impl.ReviewPriaseDaoImpl;
import com.film.service.ReviewPriaseService;
import com.film.service.ReviewService;

public class ReviewPriaseServiceImpl implements ReviewPriaseService {
	private ReviewPriaseDao  reviewPriaseDao = new ReviewPriaseDaoImpl();
	private ReviewService reviewService = new ReviewServiceImpl();
	@Override
	public int insertReviewPriase(int uId, int revId,int praise) {
		reviewService.updateReviewPraise(praise, revId);
		return reviewPriaseDao.insertReviewPriase(uId, revId);
	}

	@Override
	public int deleteReviewPriase(int uId, int revId,int praise) {
		// TODO Auto-generated method stub
		reviewService.updateReviewPraise(praise, revId);
		return reviewPriaseDao.deleteReviewPriase(uId, revId);
	}

	@Override
	public List<Integer> selectUserReviewPriase(int uId) {
		// TODO Auto-generated method stub
		return reviewPriaseDao.selectUserReviewPriase(uId);
	}

}
